//
//  AYSLiveModel.m
//  AiYingShiProject
//
//  Created by lanou on 15/10/29.
//  Copyright (c) 2015年 李晓理. All rights reserved.
//

#import "AYSLiveModel.h"

@implementation AYSLiveModel
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}

- (instancetype)init
{
    self = [super init];
    if (self)
    {
        _logoArr = [NSMutableArray array];
    }
    return self;
}
- (void)setValue:(id)value forKey:(NSString *)key
{
    if ([key isEqualToString:@"current_programs"])
    {
        if ([value count] != 0)
        {
            _current_programs = [[AYSLiveCurrentModel alloc] init];
            [_current_programs setValuesForKeysWithDictionary:value[0]];
        }
       
    }
    else if ([key isEqualToString:@"logo"])
    {
        for (NSDictionary *logoDic in value)
        {
             _logo = [[AYSLiveLogoModel alloc] init];
            [_logo setValuesForKeysWithDictionary:logoDic];
            [_logoArr addObject:_logo];
        }
      
    }
    else
    {
        [super setValue:value forKey:key];
    }
}
@end
